<?php

class User_model extends CI_Model {

    var $table = 'Login';

    function Usermodel() {
        parent::Model();
    }

    function authenticate($username, $password) {
        $where = array(
            'username' => $username,
            'password' => $password,
        );
        $this->db->where($where);
        $this->db->from($this->table);
        $query = $this->db->get();
        $row = $query->row_array();

        return array($query->num_rows(), @$row['ID'], @$row['Name'], @$row['username']);
    }

}